Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE
Record creation
Record creation behavior differs between an OpenEdge database and an ORACLE database accessed through the DataServer. The following code fragments provide examples of the different behavior.
If you have a table called
custwith a field calledcust-numdefined as an indexed field, and you write the following procedure:
- Progress 4GL — Does not create the record right away (at the
CREATEstatement). It writes it to the database at the end of the record scope or when the index information is supplied. In this example, the Progress 4GL writes the record after the statementcust-num = 10.- OpenEdge DataServer for ORACLE — Writes the record to ORACLE later than it is written to an OpenEdge database. The DataServer writes the record at the end of the record scope.
Another example of the differences between the Progress 4GL and the DataServer occurs if you write a procedure similar to the following:
To get the correct response from the DataServer, use the following program:
In this example, however, using a
Note: Using theVALIDATEstatement causes the DataServer to write the record to the database. TheVALIDATEstatement causes the DataServer to write the record that contains customer 111 to the database before theFINDstatement occurs. TheRELEASEstatement also causes the DataServer to write the record to the database; however theRELEASEstatement clears the contents of buffers.ROWIDfunction might cause a newly created record to be written earlier to an ORACLE database than to an OpenEdge database. If you do not assign values to all mandatory fields for a record, theROWIDfunction will fail.This difference in behavior might also be apparent when you open a query. Newly created records might not appear in the results set of queries that you opened before you created the records. Reopen the query to access the new records.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |